package com.javafactroy.kunlong.data.valueobj;


import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import lombok.Data;

/**
*  @author raymond.lei@163.com
*  @date   2023-11-11 20:40:03

*/
@Data
public class TSysUserMetadataDict {
    /*表名*/
    String tableName;
    String tableComment;
    // 主键
    String pkeyField;
    // 属性与列关系
    BiMap<String, String> prop2ColMap;

    public TSysUserMetadataDict() {

        tableName = "t_sys_user";
        tableComment = "t_sys_user";
        pkeyField = "id";

        prop2ColMap = HashBiMap.create();
        //prop2ColMap.put();
        //		prop2ColMap.put("id","id");
		prop2ColMap.put("username","username");
		prop2ColMap.put("passwd","passwd");
		prop2ColMap.put("realname","realname");
		prop2ColMap.put("corpId","corp_id");
		prop2ColMap.put("orgId","org_id");
		prop2ColMap.put("mobileNo","mobile_no");
		prop2ColMap.put("email","email");
		prop2ColMap.put("status","status");
		prop2ColMap.put("remark","remark");
		prop2ColMap.put("createBy","create_by");
		prop2ColMap.put("createOn","create_on");
		prop2ColMap.put("opBy","op_by");
		prop2ColMap.put("opOn","op_on");
		prop2ColMap.put("extParams","ext_params");
		prop2ColMap.put("employeeId","employee_id");
    }

    public String prop2Col(String prop) {
        return prop2ColMap.get(prop);
    }

    public String col2Prop(String prop) {
        return prop2ColMap.inverse().get(prop);
    }

}
